package com.fangzhi.mobel.vo;

import com.fangzhi.utils.GlobalParam;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.util.StringUtils;

import java.io.Serializable;
import java.util.List;

@Data
@Accessors(chain = true)
public class TopVo implements Serializable {

    // 本月销售冠军
    private Top userTop;
    // 销售额排行
    private List<Top> salesTop;
    // 提成排行
    private List<Top> commissionTop;
    // 微信用户排行
    private List<Top> wxTop;
    // 部门销售额排行
    private List<Top> deptSaleTop;

    @Data
    public static class Top{
        private String avatar;
        private String name;
        private Object num;
        public void setAvatar(String avatar) {
            if (StringUtils.hasText(avatar))
                this.avatar = GlobalParam.IMAGE_URL + avatar;
        }
    }
}
